<?php


use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;


/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

//
//include('czy/api.php');
//include '../routes/qyf/api.php';
//require '../routes/syj/api.php';
//include '../routes/gao/api.php';
//require '../routes/ly/api.php';

Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
    return $request->user();
});

//Route::get('BrokerLogin',[\App\Http\Controllers\Api\Syj\Login\LoginController::class,'BrokerLogin']);

//房源搜索展示
Route::get('test/house/index',[\App\Http\Controllers\TestHousingController::class,'getIndex']);
//添加房源
Route::post('test/house/create',[\App\Http\Controllers\TestHousingController::class,'createHouse']);
//查看详情
Route::get('test/house/detail',[\App\Http\Controllers\TestHousingController::class,'detailHouse']);
//修改房源
Route::put('test/house/update',[\App\Http\Controllers\TestHousingController::class,'updateHouse']);
//删除房源
Route::delete('test/house/del',[\App\Http\Controllers\TestHousingController::class,'delHouse']);

Route::fallback(function(){
    return response()->json(['data'=>[],'message' => '请输入正确的请求地址','code'=>404], 404);
});
